/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proyecto.modelo;
import java.io.Serializable;

/**
 *
 * @author javaee
 */
public class Restaurante implements Serializable {

    private static final String SELECT_BY_NAME = "select * from restaurantre where restaurante like ?";
    private static final String SELECT_BY_ID = "select * from restaurante where idrestaurante=?";
    private static final String SELECT_ALL_COUNT = "select count(*) from restaurante";
    private static final String SELECT_ALL = "select * from restaurante";
    private static final String INSERT = "insert into restaurante(restaurante,direccion,telefono) values(?,?,?)";
    private static final String DELETE = "delete from restaurante where idrestaurante=?";
    private static final String UPDATE_BASE = "UPDATE restaurante SET restaurante=?, direccion=?, telefono=? WHERE idrestaurante =?";
    
    private Integer idrestaurante;
    private String restaurante;
    private String direccion;
    private String telefono;

    public Restaurante() {
    }

    public Restaurante(String restaurante, String direccion, String telefono) {
        this.restaurante = restaurante;
        this.direccion = direccion;
        this.telefono = telefono;
    }

    public Integer getIdrestaurante() {
        return idrestaurante;
    }

    public void setIdrestaurante(Integer idrestaurante) {
        this.idrestaurante = idrestaurante;
    }

    public String getRestaurante() {
        return restaurante;
    }

    public void setRestaurante(String restaurante) {
        this.restaurante = restaurante;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 79 * hash + (this.idrestaurante != null ? this.idrestaurante.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Restaurante other = (Restaurante) obj;
        if (this.idrestaurante != other.idrestaurante && (this.idrestaurante == null || !this.idrestaurante.equals(other.idrestaurante))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Restaurante{" + "idrestaurante=" + idrestaurante + ", restaurante=" + restaurante + ", direccion=" + direccion + ", telefono=" + telefono + '}';
    }
    
    public static String getSELECT_ALL() {
        return SELECT_ALL;
    }

    public static String getSELECT_ALL_COUNT() {
        return SELECT_ALL_COUNT;
    }

    public static String getDELETE() {
        return DELETE;
    }

    public static String getSELECT_BY_NAME() {
        return SELECT_BY_NAME;
    }
    
     public static String getSELECT_BY_ID() {
        return SELECT_BY_ID;
    }
    
    public static String getINSERT()
    {
      return INSERT;
    }
    
    public static String getUPDATE()
    {
     return UPDATE_BASE;
    }
}
